import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '配置名',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '是否启用 0.未启用 1.启用',
    align: "center",
    dataIndex: 'isOpen',
    customRender:({text}) => {
       return  render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]);
     },
  },
  {
    title: '青铜人数',
    align: "center",
    dataIndex: 'level1Num'
  },
  {
    title: '白银人数',
    align: "center",
    dataIndex: 'level2Num'
  },
  {
    title: '黄金人数',
    align: "center",
    dataIndex: 'level3Num'
  },
  {
    title: '青铜团队1抽成百分比',
    align: "center",
    dataIndex: 'level1FirstPct'
  },
  {
    title: '青铜团队2抽成百分比',
    align: "center",
    dataIndex: 'level1SecondPct'
  },
  {
    title: '白银团队1抽成百分比',
    align: "center",
    dataIndex: 'level2FirstPct'
  },
  {
    title: '白银团队2抽成百分比',
    align: "center",
    dataIndex: 'level2SecondPct'
  },
  {
    title: '黄金团队1抽成百分比',
    align: "center",
    dataIndex: 'level3FirstPct'
  },
  {
    title: '黄金团队2抽成百分比',
    align: "center",
    dataIndex: 'level3SecondPct'
  },
];

// 高级查询数据
export const superQuerySchema = {
  name: {title: '配置名',order: 0,view: 'text', type: 'string',},
  isOpen: {title: '是否启用 0.未启用 1.启用',order: 1,view: 'number', type: 'number',},
  level1Num: {title: '青铜人数',order: 2,view: 'number', type: 'number',},
  level2Num: {title: '白银人数',order: 3,view: 'number', type: 'number',},
  level3Num: {title: '黄金人数',order: 4,view: 'number', type: 'number',},
  level1FirstPct: {title: '青铜团队1抽成百分比',order: 5,view: 'number', type: 'number',},
  level1SecondPct: {title: '青铜团队2抽成百分比',order: 6,view: 'number', type: 'number',},
  level2FirstPct: {title: '白银团队1抽成百分比',order: 7,view: 'number', type: 'number',},
  level2SecondPct: {title: '白银团队2抽成百分比',order: 8,view: 'number', type: 'number',},
  level3FirstPct: {title: '黄金团队1抽成百分比',order: 9,view: 'number', type: 'number',},
  level3SecondPct: {title: '黄金团队2抽成百分比',order: 10,view: 'number', type: 'number',},
};
